<?php
class Default_Form_LostPassword extends Zend_Form
{
    public function init()
    {
        $this->setMethod('post');

        $user = new Default_Model_User();

        $definition = $user->getTable()->getColumnDefinition('password');
        $this->addElement('password', 'password', array(
            'label'      => 'Enter your password',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array(
                array('validator' => 'StringLength',
                      'options' => array(0, $definition['length'])),
                new Areal_Validate_PasswordConfirmation(),
            )
        ));

        $this->addElement('password', 'password_2', array(
            'label'      => 'Repeat your password',
            'required'   => false,
            'filters'    => array('StringTrim'),
        ));

        $this->addElement('submit', 'submit', array(
            'label'    => 'Change password',
        ));
    }
}

